#include<stdio.h>

int main(int argc, char *argv[])
{
	char c;
	scanf("%c", &c);
	if(c>='A'&&c<='Z'){
		printf("%c\n", c+('a'-'A'));
	}else if(c>='a'&&c<='z'){
		printf("%c\n", c-('a'-'A'));
	}else if(c>='0'&&c<='9'){
		printf("%d\n", c-'0');
	}else{
		printf("error\n");
	}
	return 0;
}
